package net.bolue.sysmng.tblbean;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;

/**
 * 子系统
 * @author Administrator
 *
 */
public class SubSys extends TableBean{

	/**
	 * 子系统标识
	 */
	private String subSys;
	
	/**
	 * 子系统描述
	 */
	private String sysDesc;
	
	/**
	 * 运行数据库
	 */
	private String dbResId;
	
	/**
	 * 备注
	 */
	private String remark;
	
	public String getSubSys() {
		return subSys;
	}

	public void setSubSys(String subSys) {
		this.subSys = subSys;
	}

	public String getSysDesc() {
		return sysDesc;
	}

	public void setSysDesc(String sysDesc) {
		this.sysDesc = sysDesc;
	}

	public String getDbResId() {
		return dbResId;
	}

	public void setDbResId(String dbResId) {
		this.dbResId = dbResId;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public TableBean mapToEntry(Map<String, Object> map) {
		SubSys subSys = new SubSys();
		Set<String> keySet = map.keySet();
		Iterator<String> keyIt = keySet.iterator();
		while(keyIt.hasNext()){
			String key = keyIt.next();
			Object o = map.get(key);
			if("SUBSYS".equals(key)){
				subSys.setSubSys((String)o);
			} else if("SYSDESC".equals(key)){
				subSys.setSysDesc((String)o);
			} else if("DBRESID".equals(key)){
				subSys.setDbResId((String)o);
			} else if("REMARK".equals(key)){
				subSys.setRemark((String)o);
			}
		}
		return subSys;
	}

	@Override
	public String tableName() {
		return "st_subsys";
	}

	@Override
	public String keyProps() {
		return "SUBSYS";
	}

}
